import request from '@/utils/request'

//这些方法就是从后端提取数据的
export default{
     searchByTitle(titleName,current,limit) {
        return request({
            url: `/myimage/image/searchByTitle/${titleName}/${current}/${limit}`,
            method: 'get'
            
          })
    },
    deleteImg(imgId){
        return request({
            url: `/myimage/image/delectImg/${imgId}`,
            method: 'post'
        
          })
    },
    searchImgBytag(tagName,current,limit) {
        return request({
            url: `/myimage/image/searchByTag/${tagName}/${current}/${limit}`,
            method: 'get'
            
          })
    },
    showImgInfo() {
        return request({
            url: `/myimage/image/showAllImgInfo`,
            method: 'get'
            
          })
    },

    showImgInfoPage(current,limit) {
        return request({
            url: `/myimage/image/showImage/${current}/${limit}`,
            method: 'get'
            
          })
    },
    showTag() {
        return request({
            url: `/myimage/image/showTag`,
            method: 'get'
            
          })
    },
    uploadImage(tag1,tag2,file) {
        return request({
            url: `/myimage/image/saveImage`,
            method: 'post',
          })
    },


}